<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>

    <script>
        var reg = /^java.*Java$/i
        // var reg = new RegExp("^java.*Java$", 'i')
        var str = "javaxxxjava"
        console.log(reg.test(str))



        var d = -1
        if(d){
            console.log('wanan')
        }
    </script>
</head>
<body>
    
</body>
</html>